The presence of gas (for example, hydrocarbon gas) in drilling fluids may be indicative of potentially disastrous events with costly consequences. Early detection of gas in drilling fluids may prevent the onset and occurrence of such events and help increase drilling safety.